﻿<Application x:Class="DeNSo.Studio.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
  <Application.Resources>

    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="W8Styles.xaml" />
      </ResourceDictionary.MergedDictionaries>

      <SolidColorBrush x:Key="forecolor" Color="#FF555555" />


      <Style TargetType="{x:Type ListViewItem}">
        <Setter Property="Background"
                Value="Transparent"/>
        <Setter Property="VerticalContentAlignment"
                Value="Center"/>
        <Setter Property="Margin"
                Value="0,1,0,1"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListViewItem}">
              <Border x:Name="Bd" Background="{TemplateBinding Background}"
    		            BorderBrush="{TemplateBinding BorderBrush}"
    		            BorderThickness="{TemplateBinding BorderThickness}"
    		            SnapsToDevicePixels="true" Padding="0,0,4,0">

                <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    			                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsSelected" Value="true">
                  <Setter TargetName="Bd" Property="Background" Value="#FFFF0000"/>
                  <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                </Trigger>
                <Trigger Property="IsMouseOver" Value="true">
                  <Setter TargetName="Bd" Property="Background" Value="#66FF0000"/>
                  <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                </Trigger>
                <MultiTrigger>
                  <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="true"/>
                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                  </MultiTrigger.Conditions>
                  <Setter TargetName="Bd" Property="Background" Value="#FFFF0000"/>
                  <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                </MultiTrigger>
                <Trigger Property="IsEnabled" Value="false">
                  <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>



    </ResourceDictionary>

  </Application.Resources>
</Application>
